package com.ruoyi.service.impl;

import java.util.List;

import com.ruoyi.domain.ErpOrderDetail;
import com.ruoyi.mapper.ErpOrderDetailMapper;
import com.ruoyi.service.IErpOrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 销售订单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-25
 */
@Service
public class ErpOrderDetailServiceImpl implements IErpOrderDetailService
{
    @Autowired
    private ErpOrderDetailMapper erpOrderDetailMapper;

    /**
     * 查询销售订单明细
     * 
     * @param id 销售订单明细主键
     * @return 销售订单明细
     */
    @Override
    public ErpOrderDetail selectErpOrderDetailById(Long id)
    {
        return erpOrderDetailMapper.selectErpOrderDetailById(id);
    }

    /**
     * 查询销售订单明细列表
     * 
     * @param erpOrderDetail 销售订单明细
     * @return 销售订单明细
     */
    @Override
    public List<ErpOrderDetail> selectErpOrderDetailList(ErpOrderDetail erpOrderDetail)
    {
        return erpOrderDetailMapper.selectErpOrderDetailList(erpOrderDetail);
    }

    /**
     * 新增销售订单明细
     * 
     * @param erpOrderDetail 销售订单明细
     * @return 结果
     */
    @Override
    public int insertErpOrderDetail(ErpOrderDetail erpOrderDetail)
    {
        return erpOrderDetailMapper.insertErpOrderDetail(erpOrderDetail);
    }

    /**
     * 修改销售订单明细
     * 
     * @param erpOrderDetail 销售订单明细
     * @return 结果
     */
    @Override
    public int updateErpOrderDetail(ErpOrderDetail erpOrderDetail)
    {
        return erpOrderDetailMapper.updateErpOrderDetail(erpOrderDetail);
    }

    /**
     * 批量删除销售订单明细
     * 
     * @param ids 需要删除的销售订单明细主键
     * @return 结果
     */
    @Override
    public int deleteErpOrderDetailByIds(Long[] ids)
    {
        return erpOrderDetailMapper.deleteErpOrderDetailByIds(ids);
    }

    /**
     * 删除销售订单明细信息
     * 
     * @param id 销售订单明细主键
     * @return 结果
     */
    @Override
    public int deleteErpOrderDetailById(Long id)
    {
        return erpOrderDetailMapper.deleteErpOrderDetailById(id);
    }
}
